package com.digua.base.ui.activity

import android.os.Bundle
import android.widget.ImageView
import android.widget.RelativeLayout
import com.blankj.utilcode.util.SizeUtils
import com.digua.base.R
import com.digua.base.base.BaseWebActivity
import com.digua.base.databinding.ActivityBaseWebBinding

class ProjectDocActivity : BaseWebActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        ui = ActivityBaseWebBinding.inflate(layoutInflater)
        super.onCreate(savedInstanceState)
        setContentView(ui.root)
        initData()
    }

    private fun initData() {
        val back = ImageView(this)
        back.setImageResource(R.mipmap.icon_back)
        back.setOnClickListener { finish() }
        ui.root.addView(back)
        val size = SizeUtils.dp2px(45F)
        val layoutParams = RelativeLayout.LayoutParams(size, size)
        layoutParams.marginStart = SizeUtils.dp2px(18F)
        layoutParams.topMargin = SizeUtils.dp2px(7F)
        back.elevation = SizeUtils.dp2px(3F).toFloat()
        back.layoutParams = layoutParams
    }
}